<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/file/FindFile.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_f17c642dae9e225ab953fe9c6da2e34a.html">file</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">FindFile.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_find_file_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef _FINDFILE_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define _FINDFILE_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;../thread/SharedPtr.h&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;../stream/StringTools.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;../stream/internal/StringImp.h&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="_find_file_8h.html#a6abbf44312b6a477cc2d9a7e958090b1">   16</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a> (<a class="code" href="tools_8h.html#ad16f14718feefaa629b3b7601ac9fdeb">__stdcall</a> *_CallBackFindFile)(<a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a> *szCurPath, <a class="code" href="struct___f_i_l_e_f_i_n_d_i_n_f_o__.html">PFILEFINDINFO</a> <a class="code" href="_find_file_8h.html#a6abbf44312b6a477cc2d9a7e958090b1">pFileInfo</a>, <span class="keywordtype">void</span> *<a class="code" href="_find_file_8h.html#a0d6390569fda03a070924baf0667963f">lpParam</a>);</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_c_find_file.html">   21</a></span>&#160;<span class="keyword">class </span><a class="code" href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a> <a class="code" href="class_c_find_file.html">CFindFile</a></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <a class="code" href="tools_8h.html#af0d60cfe49f1e07cbec28c12afc4343e">delete_class_copy_operator</a>(<a class="code" href="class_c_find_file.html">CFindFile</a>);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <a class="code" href="class_c_find_file.html">CFindFile</a>();</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    ~<a class="code" href="class_c_find_file.html">CFindFile</a>();</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> EnumAllFile(<span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* sPath,</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                     _CallBackFindFile pFunc, <span class="keywordtype">void</span> *lpParama = <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>,</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                     <span class="keywordtype">bool</span> bIsListSub = <span class="keyword">true</span>);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordtype">bool</span> FindFile(<span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* sPath);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">bool</span> FindNext();</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordtype">bool</span> IsDir();</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* GetFileName();</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* GetFilePath();</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keyword">const</span> <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a>* <a class="code" href="namespace_share_api.html#af058258537f5205e21395182fcc04208">GetLastError</a>();</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    time_t GetFileCreateTime();</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    time_t GetFileUpdateTime();</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <a class="code" href="tools_8h.html#a6a2b55a6391419ed0b7b9da06e094b4b">INT64</a> <a class="code" href="namespace_share_api.html#a8723a4c07d1482980a46b2f650bd2e5e">GetFileSize</a>();</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordtype">void</span> _CloseHandle();</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="class_c_find_file.html#ac7d9fa47e02ba25c6395524e14ba9663">   69</a></span>&#160;    StringImp&lt;tstring&gt; <a class="code" href="class_c_find_file.html#ac7d9fa47e02ba25c6395524e14ba9663">_errMsg</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_c_find_file.html#a5f8cc4e4bfdccf9fd297c5a348b8803e">   70</a></span>&#160;    <a class="code" href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a> _szFilePath[<a class="code" href="tools_8h.html#ab99ded389af74001a6298fc9e44e74e5">MAX_PATH</a>];</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_c_find_file.html#ae2d0cab5193aaf562c400d374ec24044">   71</a></span>&#160;    <a class="code" href="tools_8h.html#ab00d7bdead70fa34f855541305b0c89e">FILE_HANDLE</a> <a class="code" href="class_c_find_file.html#ae2d0cab5193aaf562c400d374ec24044">_hFile</a>;</div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="class_c_find_file.html#aab70f379f1c21d505ebf2353bc703ab3">   72</a></span>&#160;    <a class="code" href="struct___f_i_l_e_f_i_n_d_i_n_f_o__.html">FILEFINDINFO</a> <a class="code" href="class_c_find_file.html#aab70f379f1c21d505ebf2353bc703ab3">_cFileInfo</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;};</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="atools_8h_html_a65c91f8d7af3c67b8a21e089fdddd0fe"><div class="ttname"><a href="tools_8h.html#a65c91f8d7af3c67b8a21e089fdddd0fe">TCHAR</a></div><div class="ttdeci">#define TCHAR</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00187">tools.h:187</a></div></div>
<div class="ttc" id="a_find_file_8h_html_a0d6390569fda03a070924baf0667963f"><div class="ttname"><a href="_find_file_8h.html#a0d6390569fda03a070924baf0667963f">lpParam</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS typedef PFILEFINDINFO void * lpParam</div><div class="ttdef"><b>Definition:</b> <a href="_find_file_8h_source.html#l00016">FindFile.h:16</a></div></div>
<div class="ttc" id="atools_8h_html_af0d60cfe49f1e07cbec28c12afc4343e"><div class="ttname"><a href="tools_8h.html#af0d60cfe49f1e07cbec28c12afc4343e">delete_class_copy_operator</a></div><div class="ttdeci">#define delete_class_copy_operator(ClassName)</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00345">tools.h:345</a></div></div>
<div class="ttc" id="anamespace_share_api_html_af058258537f5205e21395182fcc04208"><div class="ttname"><a href="namespace_share_api.html#af058258537f5205e21395182fcc04208">ShareApi::GetLastError</a></div><div class="ttdeci">LIBTOOLS DWORD GetLastError()</div><div class="ttdoc">返回上一次函数的错误值</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l00049">ShareApi.cpp:49</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_c_find_file_html_aab70f379f1c21d505ebf2353bc703ab3"><div class="ttname"><a href="class_c_find_file.html#aab70f379f1c21d505ebf2353bc703ab3">CFindFile::_cFileInfo</a></div><div class="ttdeci">FILEFINDINFO _cFileInfo</div><div class="ttdef"><b>Definition:</b> <a href="_find_file_8h_source.html#l00072">FindFile.h:72</a></div></div>
<div class="ttc" id="atools_8h_html_a64152c8b939d1ce06c7c5cb6c97b62f8"><div class="ttname"><a href="tools_8h.html#a64152c8b939d1ce06c7c5cb6c97b62f8">LIBTOOLS</a></div><div class="ttdeci">#define LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00095">tools.h:95</a></div></div>
<div class="ttc" id="a_find_file_8h_html_a37cc1038758216808d5f75090b093c9a"><div class="ttname"><a href="_find_file_8h.html#a37cc1038758216808d5f75090b093c9a">int</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS typedef int(__stdcall *_CallBackFindFile)(TCHAR *szCurPath</div><div class="ttdoc">遍历目录的回调函数</div></div>
<div class="ttc" id="aclass_c_find_file_html_ae2d0cab5193aaf562c400d374ec24044"><div class="ttname"><a href="class_c_find_file.html#ae2d0cab5193aaf562c400d374ec24044">CFindFile::_hFile</a></div><div class="ttdeci">FILE_HANDLE _hFile</div><div class="ttdef"><b>Definition:</b> <a href="_find_file_8h_source.html#l00071">FindFile.h:71</a></div></div>
<div class="ttc" id="atools_8h_html_ad16f14718feefaa629b3b7601ac9fdeb"><div class="ttname"><a href="tools_8h.html#ad16f14718feefaa629b3b7601ac9fdeb">__stdcall</a></div><div class="ttdeci">#define __stdcall</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00150">tools.h:150</a></div></div>
<div class="ttc" id="anamespace_share_api_html_a8723a4c07d1482980a46b2f650bd2e5e"><div class="ttname"><a href="namespace_share_api.html#a8723a4c07d1482980a46b2f650bd2e5e">ShareApi::GetFileSize</a></div><div class="ttdeci">LIBTOOLS int GetFileSize(FILE_HANDLE hFile)</div><div class="ttdoc">参考GetFileSizeEx的说明</div><div class="ttdef"><b>Definition:</b> <a href="_share_api_8cpp_source.html#l00159">ShareApi.cpp:159</a></div></div>
<div class="ttc" id="aclass_c_find_file_html"><div class="ttname"><a href="class_c_find_file.html">CFindFile</a></div><div class="ttdoc">文件遍历类</div><div class="ttdef"><b>Definition:</b> <a href="_find_file_8h_source.html#l00021">FindFile.h:21</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_c_find_file_html_ac7d9fa47e02ba25c6395524e14ba9663"><div class="ttname"><a href="class_c_find_file.html#ac7d9fa47e02ba25c6395524e14ba9663">CFindFile::_errMsg</a></div><div class="ttdeci">StringImp&lt; tstring &gt; _errMsg</div><div class="ttdef"><b>Definition:</b> <a href="_find_file_8h_source.html#l00069">FindFile.h:69</a></div></div>
<div class="ttc" id="atools_8h_html_ab99ded389af74001a6298fc9e44e74e5"><div class="ttname"><a href="tools_8h.html#ab99ded389af74001a6298fc9e44e74e5">MAX_PATH</a></div><div class="ttdeci">#define MAX_PATH</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00149">tools.h:149</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="astruct___f_i_l_e_f_i_n_d_i_n_f_o___html"><div class="ttname"><a href="struct___f_i_l_e_f_i_n_d_i_n_f_o__.html">_FILEFINDINFO_</a></div><div class="ttdoc">文件查找信息</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00311">tools.h:311</a></div></div>
<div class="ttc" id="a_find_file_8h_html_a6abbf44312b6a477cc2d9a7e958090b1"><div class="ttname"><a href="_find_file_8h.html#a6abbf44312b6a477cc2d9a7e958090b1">pFileInfo</a></div><div class="ttdeci">DEF_BEG_LIBTOOLS typedef PFILEFINDINFO pFileInfo</div><div class="ttdef"><b>Definition:</b> <a href="_find_file_8h_source.html#l00016">FindFile.h:16</a></div></div>
<div class="ttc" id="atools_8h_html_a6a2b55a6391419ed0b7b9da06e094b4b"><div class="ttname"><a href="tools_8h.html#a6a2b55a6391419ed0b7b9da06e094b4b">INT64</a></div><div class="ttdeci">long long INT64</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00132">tools.h:132</a></div></div>
<div class="ttc" id="atools_8h_html_ab00d7bdead70fa34f855541305b0c89e"><div class="ttname"><a href="tools_8h.html#ab00d7bdead70fa34f855541305b0c89e">FILE_HANDLE</a></div><div class="ttdeci">#define FILE_HANDLE</div><div class="ttdoc">文件句柄</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00306">tools.h:306</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
